Ext.define('BISC.view.ServerManagerWindow', {
    extend: 'Ext.window.Window',
    requires: [ 'BISC.view.ServerManagerPanel' ],
    height: 250,
    id: 'serverManagerWindow',
    width: 600,
    title: 'Server Manager',
    closeAction: 'hide',
    bodyBorder: false,
    layout: 'fit',
    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
                {
                    xtype: 'servermanagerpanel',
                    scope: me
                }
            ],
            dockedItems: [
                {
                    xtype: 'toolbar',
                    ui: 'footer',
                    dock: 'bottom',
                    items: [
                        '->',
                        {
                            xtype: 'button',
                            width: 75,
                            text: 'Close',
                            scope: me,
                            handler: me.doClose
                        }
                    ]
                }
            ]
        });

        me.callParent(arguments);
    },

    doClose: function(button, e, options) {
        // fire close event on parent
        this.hide();
    }

});
